package com.gd.iot.energy.service.systemadmin;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gd.iot.energy.po.systemadmin.SupplierPO;
import com.gd.iot.energy.pojo.common.vo.PageVO;
import com.gd.iot.energy.pojo.systemadmin.dto.SupplierSaveDTO;
import com.gd.iot.energy.pojo.systemadmin.vo.SupplierPageVO;
import com.gd.iot.energy.pojo.systemadmin.vo.SupplierVO;

import java.util.List;

/**
 * @Description:
 * @Author: zgyz
 * @Date: 2020/8/6 23:22
 */
public interface SupplierService extends IService<SupplierPO> {

    /**
     * 获取列表
     * @param supplierName
     * @return
     */
    List<SupplierVO> getSupplierVOs(String supplierName);

    /**
     * 获取分页数据
     * @param supplierName
     * @param supplierContact
     * @param supplierAddress
     * @param pageSize
     * @param pageNum
     * @param orderColumn
     * @param orderType
     * @return
     */
    PageVO<SupplierPageVO> getPageSupplierVOs(String supplierName, String supplierContact, String supplierAddress,
                                              Integer pageSize, Integer pageNum, String orderColumn, String orderType);

    /**
     * 新增供应商
     * @param supplierSaveDTO
     * @return
     */
    Long add(SupplierSaveDTO supplierSaveDTO);

    /**
     * 更新供应商
     * @param supplierSaveDTO
     * @return
     */
    boolean update(SupplierSaveDTO supplierSaveDTO);

    /**
     * 删除供应商
     * @param ids
     * @return
     */
    boolean delete(List<Integer> ids);

    /**
     * 根据id获取供应商
     * @param id
     * @return
     */
    SupplierSaveDTO getSupplier(Integer id);
}
